Do not reduce number of humans that still need rescue in SARMissionHo… #60
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
…istInNotify().
Finally, I understood where the issue was. Here is a log of what happen when a human is hoisted:
___src/simutils.c: Entering SARSimDoHoistIn()
______src/simutils.c: Entering SARSimBoardObject()
_________src/mission.c: Entering SARMissionPassengersEnterNotify()
___________ objective->humans_need_rescue is reduced here
_________src/mission.c: Leaving SARMissionPassengersEnterNotify()
______src/simutils.c: Leaving SARSimBoardObject()
______src/mission.c: Entering SARMissionHoistInNotify()
________ objective->humans_need_rescue is reduced here
______src/mission.c: Leaving SARMissionHoistInNotify()
___src/simutils.c: Leaving SARSimDoHoistIn()
Removing the second decrementation solves the issue #20 . If the first decrementation (the one in SARMissionPassengersEnterNotify()) is removed instead of the second one, it causes other issues.